-
-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support building on Windows with vcpkg #34
base: master
Are you sure you want to change the base?
Conversation
Okay so I tried building this on Debian 10, like usual, to test if it still works.
I'm guessing a version mismatch of bullet between the one I got from apt-get on Debian (is 2.87) and that required for BulletFileLoader? |
Alright, so it was indeed a version mismatch that was causing the problem. |
@cryham were you able to successfully build it with the latest changes I made? |
Well I tried and it looked promising but I ran into issues, and seems that it is trying to use my old installed mygui build from older try and not the system installed one which I want. |
That's weird... I barely touched |
@cryham would you still be interested in this pull request? I can continue working on this; I'd just like to know if you were working on this separately or if you had an alternative build method. |
Well I am still interested in any working alternative for building on Windows (other than building evth from sources like I did). I don't have much knowledge about vcpkg or conan. So I can't just make any work. |
1e7f904
to
9cb7b8a
Compare
4265e3b
to
6d8fcc7
Compare
Alright, I believe I fixed everything this time. Tested building on Debian 11 (using WSL)1 and on Windows 10 with Visual Studio 2022 (the original steps are identical, you would just need to substitute Regarding Conan: I personally have not used it so I can't really say much about it, but if the Conan integration PR works out then that's fine too, as long as there's an easy way to compile StuntRally from sources on Windows. Footnotes
|
Following the plan outlined in #33, here is the vcpkg integration PR. Now, Windows users don't have to bother with compiling a million other things to get StuntRally to build!
Here's what the Windows build process looks like with these changes:
git clone --single-branch --branch vcpkg https://github.com/xvrc/stuntrally.git
cmake -B build -S . -G"Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE=<path to vcpkg root>/scripts/buildsystems/vcpkg.cmake
.Note: if this steps fails while building Ogre, it's most likely because it couldn't find the D3DX9 utility library, which is no longer part of the Windows 10 SDK. To fix this, you'll need to do the following, then re-run the CMake command afterwards:
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\
and copy all the files that start withd3dx9
into the Windows 10 SDK (with a default Visual Studio installation, this should be atC:\Program Files (x86)\Windows Kits\10
) include folder.C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\<target architecture>\
and copyd3dx9.lib
to the respective Windows 10 SDK library folder (from the SDK's root, go toLib\<version>\um\<target architecture>\
). This should be done for both x86 and x64 folders if unsure of the targeted architecture.build/StuntRally.sln
with VS 2019 and build it.build/bin/
.To run StuntRally from the
bin
directory, where the executable is located:build/vcpkg_installed/<triplet>/bin/
for non-debug builds andbuild/vcpkg_installed/<triplet>/debug/bin/
for debug builds, into thebin
directory.config
anddata
folders into thebin
directory.data/tracks
inside thebin
directory.Finally, you can start the game.
Some other details about the changes:
bullet3
package doesn't build BulletFileLoader nor BulletWorldImporter, so these were added to the source tree.mygui
package only builds the MyGUI Engine core library, so its Ogre rendering backend code was also added to the source tree.SDL2_LIBRARIES
which includes it), so I just added an extra check inmain.cpp
.MyGUI_D3D11
files because there's already the MyGUI Ogre render backend.